﻿<%@ Page Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="default.aspx.cs" Inherits="example" %>

<asp:Content ID="Content2" ContentPlaceHolderID="Main" runat="Server">

    <table>
        <tr>
            <td>Username:</td>
            <td><asp:TextBox ID="Username" runat="server" Width="300" data-validator-group="form" data-validator-required="Please enter your desired username." /></td>
        </tr>
        <tr>
            <td>New Password:</td>
            <td><asp:TextBox ID="NewPassword" runat="server" TextMode="Password" Width="300" data-validator-group="form" data-validator-required="Please enter your desired password." data-validator-regular="Invalid password, the password must be 6 characters or longer." data-validator-validexpress=".{6,}" /></td>
        </tr>
        <tr>
            <td>Confirm Password:</td>
            <td><asp:TextBox ID="ConfirmPassword" runat="server" TextMode="Password" Width="300" data-validator-group="form" data-validator-required="Please confirm your password." data-validator-compare="Password mismatch, the password and confirm password fields must match." data-validator-compareto="Main_NewPassword" /></td>
        </tr>
        <tr>
            <td>Email:</td>
            <td><asp:TextBox ID="Email" runat="server" Width="300" data-validator-group="form" data-validator-required="Please enter your email address." data-validator-email="Invalid email address, please check for typos." /></td>
        </tr>
        <tr>
            <td>Gender:</td>
            <td>
                <asp:RadioButtonList ID="Gender" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" data-validator-group="form" data-validator-required="Please specify your gender.">
                    <asp:ListItem>Male</asp:ListItem>
                    <asp:ListItem>Female</asp:ListItem>
                </asp:RadioButtonList>
            </td>
        </tr>
        <tr>
            <td>Age:</td>
            <td><asp:TextBox ID="Age" runat="server" Width="300" data-validator-group="form" data-validator-custom="Invalid age, your age must be greater than 5 and less than 100." data-validator-customfn="var age = parseInt(this.value); return age > 5 && age < 100;" /></td>
        </tr>
        <tr>
            <td></td>
            <td><asp:CheckBox ID="Terms" runat="server" data-validator-group="form" data-validator-required="Please agree to the terms and conditions before proceeding" Text="I agree to the terms and conditions" /></td>
        </tr>
        <tr>
            <td></td>
            <td><asp:Button ID="SubmitBtn" runat="server" Text="Submit" OnClientClick="return validate('form');" /></td>
        </tr>
    </table>

</asp:Content>
